/*
 * Copyright (C) 2019-2020 Alibaba Group Holding Limited
 */

#ifndef _MVOICE_ALG_H_
#define _MVOICE_ALG_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
    MVC_EVT_VAD_START = 0,
    MVC_EVT_VAD_END,
    MVC_EVT_KWS,
    MVC_EVT_ASR,
} mvoice_event_e;

typedef struct {
    int interleaved;
    uint16_t samples_per_frame;      // sample number per process
    uint16_t sample_freq;
    uint16_t samples_bits;
} alg_data_format_t;

typedef void (* mvoice_event_cb)(mvoice_event_e evt_id, void *data, int size);

/**
 * @brief  start voice process
 * @return 0 on success, < 0 on failed
 */
int mvoice_process_start(void);

/**
 * @brief  stop voice process
 * @return 0 on success, < 0 on failed
 */
int mvoice_process_stop(void);

/**
 * @brief  pause voice process
 * @return 0 on success, < 0 on failed
 */
int mvoice_process_pause(void);

/**
 * @brief  resume voice process
 * @return 0 on success, < 0 on failed
 */
int mvoice_process_resume(void);

#ifdef __cplusplus
}
#endif

#endif